Electronics Design

Throughout this week, we will be focusing on acquiring the skills and knowledge necessary for Electronics Design. Grasping this subject is a crucial step as we delve deeper into the world of electronics. We are going to begin with a thorough understanding of the basic concepts that lay the foundation for all electronic operations.
These fundamental concepts include Voltage, which can be thought of as the push or force behind the flow of electrons; Current, representing the rate at which the charge is flowing; Resistance, which indicates how much a material objects to the flow of electrons, and finally, the concept of Power, which is the rate at which energy is absorbed or produced.
Having a solid understanding of these four concepts is paramount to grasp the intricacies of Electronics Design. So let's embark on this journey of learning, where we will deep dive into each of these concepts, understand their importance, and see how they interact in the grand scheme of electronics. You can learn more on our Group assignment

Concept Unit Definition Formula
Voltage Volts Voltage is the electric potential difference between two points. V = I * R
Current Amperes Current is the flow of electric charge per unit time. I = V / R
Resistance Ohms Resistance is the measure of opposition to electric current. R = V / I
Power Watts Power is the rate at which work is done or energy is transferred. P = I * V

In order to create an effective and functional electronic design, it's crucial to gain a thorough understanding of the basic components that will be utilized in the process. These components form the building blocks of our design and their proper application and integration will determine the overall success of the project.

Component Units Schematic Footprint Picture
LED N/A
Resistor Ohms
Button N/A
Microcontroller N/A
Capacitor Farad

Designing in KiCad

Every project we undertake will be composed of two essential parts: the Printed Circuit Board (PCB) and the schematics. These two elements operate hand in hand to ensure the successful execution of the project. The schematics play a vital role as they serve as a kind of construction plane or blueprint. They provide us with a detailed reference of how each component within the project is interconnected. This is crucial in avoiding errors and ensuring everything works as it should. On the other hand, the PCB is responsible for creating the tangible, physical connections between every single component. It's the tangible embodiment of the schematic, where all the planning becomes real. Together, the PCB and the schematics form the backbone of any electronic project, allowing us to transform ideas into reality.

For this, we will use Kicad, A Cross Platform and Open Source Electronics Design Automation Suite that supports everything from the most basic schematic to a complex hierarchical design with hundreds of sheets. Create your own custom symbols or use some of the thousands found in the official KiCad library. Verify your design with integrated SPICE simulator and electrical rules checker. and it’s PCB Editor is approachable enough to make your first PCB design easy, and powerful enough for complex modern designs. A powerful interactive router and improved visualization and selection tools make layout tasks easier than ever. Another great thing about is it’s KiCad's 3D Viewer that allows easy inspection of your PCB to check mechanical fit and to preview your finished product. A built-in raytracer with customizable lighting can create realistic images to show off your work.

Before we start our design we need to think on all the components that we want our PCB will have. For this I will use the following basic components:

Component Qty
ATtiny412 1
LED 1206 2
Resistor 1K 1206 2
Resistor 0K 1206 1
Pin header 2 by 1 2
Pin header 3 by 1 2
Ceramic Capacitor 1206 1

We will create a new project in Kicad and start by looking for all of our components. For our Fab, we already have a library with the schematic, footprint and some 3D views of all the components available.

Schematic Design

For my own design I wanted to use a simple, yet powerful MCU that could take an input from a sensor and make a response to that. With that in mind, I went to our group assignment for Week 6 and dive into all the MCU that are available in our lab. For the specific idea that I want to design, I needed a MCU that had at least 8 pins with a SDA and SCL. I liked the ATtiny412 that includes all ports I needed plus: PWM, ADC, Configurable Custom Logic (CCL), Event System

I will look in the library for the components of by first using the shortcut “a” and then using the prefix “fab” followed by the component that I’m looking for. For example let’s start with a LED 1206. We select accept and then place our component wherever we want.

We will do the same for all our components and placing them for now in an ordered manner. Then we will begin by creating with a wire all the conections that need to be taken into account of all components. At this step it can be made either physically with the wire option or by labels (l).An important thing is to take into account where the 5V power will be needed and provided as well as the GND. Another thing to take into account is the need of a capacitor to make sure we follow proper convention and to protect our circuit. With all of this, we can consider our schematic complete.

PCB Design

To start creating our PCB that will be the physical connections between all of our components, we need to open the PCB file and go to tools > update PCB from schematic. After this we will see all of our components clumped together and a faint blue line that indicates which component connects to each other. Now we need to get everything in order to begin we start to hide all non essential words

We need to use a proper select our manufacturing restrictions accoording to what we learned on our Group Assignment: Electronics Production. We set those parameters in file > board set up

After this is set up, we need to create our physical connections, however, we cannot have in this stage two different pins and paths to cross each other, so I this might be a quite tedious part. This is the final design I got. As you can see non of the paths cross each other and all components are well spaced to avoid any short circuit.

MODS

To create the tool-path for the PCB I used the following website provided by the FAB Academy. MODS CE where we need to create a file that could be read by the machine. To do this, we will follow the steps provided on the week 4 of Electronic Production.

Important things to remember: set offset to 2, invert the svg of traces, and make sure both files have the same dimensions to avoid mis-match

PCB milling

Once the PCB trace was created, we need to import and get our Roland SRM20 tracing the first file.

Soldering

To add all the components on the PCB I solder them with a soldering iron and tin. This is not my best work but I’m starting o get the hang of it, The part I struggled the most was the pins as I found difficult to grab them in a 90 degree angle and solder them.

Programming

To program the new PCB with the ATtiny 412, I needed to use the UPDI protocol. Fortunately the Quentorres can be used as a programmer as stated on it´s Documentation Following those steps, I addeda simple blinking program that could make my first led blink every second, then cahnge it to blink both LED’s at the same time and finally to interchange them.

My great mistake

During my day, I tried to transport my PCB in a case to take home and do more programming and when closing it, I made the 4 pins to detach and had the GND path broken. This means that I could not do further programing on my PCB for this assignment but had enough to make sure that everything was well design. This is quite frustrating as I wanted to use this PCB as a controller for future projects but I’m sure that I will create more PCB’s in the future.

Re-Design

After this week was over, I had some mayor issues with my PCB and had to re-do my board due to a malfunction on the GND path. So I to take advantage of this, I will create a new board with a few tweaks to adapt and taking into account the Output Devices assignment, and Input Devices as well.

To do so, I will still use the Attiny 412 microcontroller but will implement an output option for an OLED display and a NTC thermistor. Another important thing to take into account is This Attiny 412 is programmed through UPDI (Unified Program and Debug Interface), so I will need 3 pins to program the MC (GND, VCC, UPDI), 4 Pins for the OLED (SDA, SCL, VCC, GND) and a wheatstone bridge to detect the small variations on the NTC thermistor. Taken all this into account, I will need a total of 7 pins (VCC and GND taken into account) which the Attiny 412 complies with this.

As recommended by my local instructor Oliver Ochoa, I added a second pair of SDA, SCL, VCC, GND pins to have a head start on the Embedded Networking and Communications week. My schematic week looks as follows. I opted to have 3 pins for the UPDI all together to make sure the programming is easy and straight.

Component Qty
Attiny412 1
OLED Pins 4
UPDI Pins 3
LED 1206 1
RES 1206 4
Capacitor 1206 1
NTC Thermistor 1
I2C pins 4

To create the PCB footprint I decided to create 4 clusters of components, the first the UPDI interface that can be located on the top side of the PCB with a 3 pinout, on the left side there are 3 resistors and the NTC thermistor, where on the pin 3 is the reference value and on the pin 2 is the input value to compare one to another to determine temperature values. On the bottom side there are two 4x1 pinouts to have an OLED display and the i2C for the future. Finaly on the right side there is a LED 1206 to have future visual reference.

To create the tool-path for the PCB I used the following website provided by the FAB Academy. MODS CE where we need to create a file that could be read by the machine. To do this, we will follow the steps provided on the week 4 of Electronic Production.
Important things to remember: set offset to 2, invert the SVG of traces, and make sure both files have the same dimensions to avoid mis-match. Another thing to take into account is the V-tool be sharp and properly set on a zero on the Z axis.
Forthe milling and tracing process of this new PCB. It had a better finish than the previous one, this was accomplish by changing the offset on the trace from 2 to 4 and making sure the V-tool was new and had no previous damage.

For the soldering I worked on the reflow as Niel recommended me and had a better result, although it is still not perfect I hope to keep improving as the weeks come by.

To program my new PCB I used the same protocol as before, having a LED blinking program. This PCB will have more to be tested on the Output and Input devices so feel free to go there and see more of the programming and uses.

Files